package registry // Package registry import "xemo.top/docker/docker/api/types/registry"
import (
	"github.com/opencontainers/image-spec/specs-go/v1"
)

// DistributionInspect 描述通过联系注册表检索图像元数据获得的结果
// DistributionInspect describes the result obtained from contacting the registry to retrieve image metadata
type DistributionInspect struct {
	// Descriptor 包含有关清单的信息，包括内容可寻址摘要
	// Descriptor contains information about the manifest,including the content addressable digest
	Descriptor v1.Descriptor
	// Platforms 包含映像支持的平台列表，通过解析清单获得
	// Platforms contains the list of platforms supported by the image,obtained by parsing the manifest
	Platforms []v1.Platform
}

// SearchResult 描述从注册表返回的搜索结果
// SearchResult describe a search result returned from a registry
type SearchResult struct {
	// StarCount 指示此存储库具有的星数
	// StarCount indicates the number of stars this repository has
	StarCount int `json:"star_count"`
	// IsOfficial 如果结果来自官方存储库，则为true。
	// IsOfficial is true if the result is from an official repository.
	IsOfficial bool `json:"is_official"`
	// Name 是存储库的名称
	// Name is the name of the repository
	Name string `json:"name"`
	// IsAutomated 指示结果是否是自动的
	// IsAutomated indicated whether the result is automated
	IsAutomated bool `json:"is_automated"`
	// Description 是存储库的文本描述
	// Description is a textual description of the repository
	Description string `json:"description"`
}
